package com.ui.basic.command.masterdata;

import java.util.List;

import org.springmodules.validation.bean.conf.loader.annotation.handler.Length;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotNull;

import com.common.basic.base.BaseCommand;
import com.common.basic.util.ComboValue;
import com.ui.basic.ibatis.model.masterdata.TblMBank;

public class CommandBank extends BaseCommand implements java.io.Serializable {

	private static final long serialVersionUID = 4784953721407567754L;

	private Long id;

	@NotBlank
	@Length(max = 5)
	private String bankCode;

	@NotBlank
	@Length(max = 50)
	private String bankName;

	@NotNull
	private Long countryId;

	private List<ComboValue> countryList;

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public String getBankCode() {
		return bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public Long getCountryId() {
		return countryId;
	}

	public void setCountryId(Long countryId) {
		this.countryId = countryId;
	}

	public void setProperty(TblMBank tblMBank) {
		this.id = tblMBank.getId();
		this.bankCode = tblMBank.getCode();
		this.bankName = tblMBank.getName();
		this.countryId = tblMBank.getCountryId();
	}

	public void setCountryList(List<ComboValue> countryList) {
		this.countryList = countryList;
	}

	public List<ComboValue> getCountryList() {
		return countryList;
	}
}